package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.MarketBrand;
import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.service.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gatsby
 * @since 2022/10/14 16:34
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    WxBrandService wxBrandService;

    @RequestMapping("list")
    public BaseRespVo list(BasePageInfo basePageInfo){
       CommonData<MarketBrand> commonData= wxBrandService.queryAllBrandLimit(basePageInfo);

       return BaseRespVo.ok(commonData,"成功");
    }


    @RequestMapping("detail")
    public BaseRespVo detail(Integer id){

        MarketBrand marketBrand=wxBrandService.queryBrandDetail(id);

        return BaseRespVo.ok(marketBrand,"成功");

    }



}
